home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-17 | 524 b | 35 lines | [TEXT/CWIE] |
- // OSQueue.h
-
- #ifndef OSQueue_h
- #define OSQueue_h
-
- #ifndef OSQueueBase_h
- #include "OSQueueBase.h"
- #endif
- #ifndef OSQueueLink_h
- #include "OSQueueLink.h"
- #endif
-
- template < class Target >
- class OSQueue: private OSQueueBase
- {
- public:
- OSQueueBase::IsEmpty;
-
- void Put( OSQueueLink<Target>& link )
- {
- OSQueueBase::Put( link );
- }
-
- Target *Get()
- {
- OSQueueLinkBase *got = OSQueueBase::Get();
- if ( got == 0 )
- return 0;
-
- return *static_cast< OSQueueLink<Target>* >( got );
- }
- };
-
- #endif
-